package com.labbol.core.exception;

import org.apache.commons.lang.StringUtils;

/**
 * 自定义XML解析异常
 * @author fuxl
 * @since 2018年2月8日下午8:58:29
 * @version v1.0
 */
public final class XmlDataParseException extends Exception {
	
	private static final long serialVersionUID = 1258820061882555801L;
	
	private String message;
	
	public XmlDataParseException() {
		super("XML解析异常");
	}
	
	public XmlDataParseException(String message) {
		super(message);
		this.message = message;
	}
	
	public XmlDataParseException(String message, Throwable cause) {
		super(message, cause);
	}

	public XmlDataParseException(Throwable cause) {
		super(cause);
	}
	
	public String getMessage() {
		return StringUtils.isBlank(message) ? super.getMessage() : message;
	}
	
}	

